* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f0f0f0;
    color: #333;
    line-height: 1.6;
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    color: #8b0000;
    margin-bottom: 10px;
}

.hidden {
    display: none;
}

/* 游戏设置区域 */
.game-setup {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    text-align: center;
}

.player-setup {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

select, button {
    padding: 8px 15px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

button {
    background-color: #8b0000;
    color: white;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #a52a2a;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* 游戏板区域 */
.game-board {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    gap: 20px;
}

/* Boss区域 */
.boss-area {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.boss-card {
    width: 200px;
    height: 280px;
    margin: 0 auto;
    background-color: #8b0000;
    border-radius: 10px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.boss-info {
    text-align: center;
}

.boss-stats {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 中间区域 */
.middle-area {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 20px;
}

.deck, .discard-pile {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.deck:before, .discard-pile:before {
    content: '';
    display: block;
    width: 100px;
    height: 140px;
    background-color: #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
}

.play-area {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.played-cards {
    min-height: 140px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

/* 玩家区域 */
.player-area {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.player-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.player-hand {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 150px;
    margin-bottom: 15px;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* 游戏日志 */
.game-log {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.log-content {
    height: 150px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    font-size: 0.9rem;
}

/* 游戏结束 */
.game-over {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin: 30px 0;
}

#game-result {
    font-size: 2rem;
    margin-bottom: 20px;
}

/* 规则部分 */
.rules-section {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

.rules-content {
    margin-top: 15px;
}

.rules-content h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #8b0000;
}

.rules-content h4 {
    margin-top: 15px;
    margin-bottom: 5px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #f2f2f2;
}

ul, ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

/* 卡牌样式 */
.card {
    width: 80px;
    height: 120px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 5px;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
}

.card.selected {
    transform: translateY(-15px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.card-top, .card-bottom {
    display: flex;
    justify-content: space-between;
}

.card-value {
    font-weight: bold;
}

.card-suit {
    font-size: 1.2rem;
}

.card-center {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
}

.hearts, .diamonds {
    color: red;
}

.clubs, .spades {
    color: black;
}

.joker {
    background-color: #f8f8f8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .middle-area {
        grid-template-columns: 1fr 1fr;
    }
    
    .play-area {
        grid-column: span 2;
    }
    
    .card {
        width: 60px;
        height: 90px;
    }
    
    .boss-card {
        width: 150px;
        height: 210px;
    }
}

@media (max-width: 480px) {
    .player-setup {
        flex-direction: column;
    }
    
    .middle-area {
        grid-template-columns: 1fr;
    }
    
    .play-area {
        grid-column: auto;
    }
}